package com.dragon.modules.yuegou.model.member;

import com.dragon.modules.yuegou.entity.member.MemberGradeLogEntity;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogGradeRule;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 会员等级更新日志模型类
 *
 * @author pbuilder generated
 * @date 2021-12-20 16:41:10
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MemberGradeLog extends MemberGradeLogEntity {

	/**
	 * 构造一个空会员等级更新日志模型对象
	 */
	public MemberGradeLog(){
		super();
	}

	/**
	 * 依据实体对象的信息构造一个会员等级更新日志模型对象
	 *
	 * @param entity 实体对象
	 */
	public MemberGradeLog(MemberGradeLogEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个会员等级更新日志模型对象
	 *
	 * @param other 其它对象
	 */
	public MemberGradeLog(MemberGradeLog other){
		super(other);
	}


	@Override
	public String getId() {
		return id;
	}

	/**
	 * 设置主键
	 *
	 * @param id 主键
	 * @return 当前对象
	 */
	public MemberGradeLog id(String id) {
		this.id = id;
		return this;
	}

	@Override
	public String getBusdId() {
		return busdId;
	}

	/**
	 * 设置商圈ID
	 *
	 * @param busdId 商圈ID
	 * @return 当前对象
	 */
	public MemberGradeLog busdId(String busdId) {
		this.busdId = busdId;
		return this;
	}

	@Override
	public String getMemberId() {
		return memberId;
	}

	/**
	 * 设置会员ID
	 *
	 * @param memberId 会员ID
	 * @return 当前对象
	 */
	public MemberGradeLog memberId(String memberId) {
		this.memberId = memberId;
		return this;
	}

	@Override
	public MemberGradeLogType getType() {
    	return type;
    }

    /**
	 * 设置[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 * 
	 * @param type [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 * @return 当前对象
	 */
    public MemberGradeLog type(MemberGradeLogType type) {
    	this.type = type;
    	return this;
    }

	@Override
	public MemberGradeLogGradeRule getGradeRule() {
    	return gradeRule;
    }

	/**
	 * 设置[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 *
	 * @param gradeRule [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 * @return 当前对象
	 */
    public MemberGradeLog gradeRule(MemberGradeLogGradeRule gradeRule) {
    	this.gradeRule = gradeRule;
    	return this;
    }

	@Override
	public String getBeforeGradeId() {
    	return beforeGradeId;
    }

    /**
	 * 设置变化前id
	 * 
	 * @param beforeGradeId 变化前id
	 * @return 当前对象
	 */
    public MemberGradeLog beforeGradeId(String beforeGradeId) {
    	this.beforeGradeId = beforeGradeId;
    	return this;
    }

	@Override
	public String getBeforeGrade() {
		return beforeGrade;
	}

	/**
	 * 设置更新前等级
	 *
	 * @param beforeGrade 更新前等级
	 * @return 当前对象
	 */
    public MemberGradeLog beforeGrade(String beforeGrade) {
    	this.beforeGrade = beforeGrade;
    	return this;
    }

	@Override
	public String getAlferGradeId() {
    	return alferGradeId;
    }

    /**
	 * 设置变化后id
	 * 
	 * @param alferGradeId 变化后id
	 * @return 当前对象
	 */
    public MemberGradeLog alferGradeId(String alferGradeId) {
    	this.alferGradeId = alferGradeId;
    	return this;
    }

	@Override
	public String getAfterGrade() {
		return afterGrade;
	}

	/**
	 * 设置更新后等级
	 *
	 * @param afterGrade 更新后等级
	 * @return 当前对象
	 */
	public MemberGradeLog afterGrade(String afterGrade) {
		this.afterGrade = afterGrade;
		return this;
	}

	@Override
	public String getReason() {
		return reason;
	}

	/**
	 * 设置更新原因
	 *
	 * @param reason 更新原因
	 * @return 当前对象
	 */
	public MemberGradeLog reason(String reason) {
		this.reason = reason;
		return this;
	}

	@Override
	public String getCreatedBy() {
		return createdBy;
	}

	/**
	 * 设置创建人id
	 *
	 * @param createdBy 创建人id
	 * @return 当前对象
	 */
	public MemberGradeLog createdBy(String createdBy) {
		this.createdBy = createdBy;
		return this;
	}

	@Override
	public String getCreatedName() {
		return createdName;
	}

	/**
	 * 设置创建人
	 *
	 * @param createdName 创建人
	 * @return 当前对象
	 */
	public MemberGradeLog createdName(String createdName) {
		this.createdName = createdName;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	/**
	 * 设置创建时间
	 *
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
	public MemberGradeLog createdTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
		return this;
	}

}
